tools/xenstore: add generic treewalk function
authorJuergen Gross <jgross@suse.com>
Tue, 13 Sep 2022 05:35:11 +0000 (07:35 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 1 Nov 2022 13:05:44 +0000 (13:05 +0000)
commit0d7c5d19bc27492360196e7dad2b227908564fff
treeffde66d94cc8238df1859edbcd5ed96857fd09fa
parent0c00c51f3bc8206c7f9cf87d014650157bee2bf4
tools/xenstore: add generic treewalk function

Add a generic function to walk the complete node tree. It will start
at "/" and descend recursively into each child, calling a function
specified by the caller. Depending on the return value of the user
specified function the walk will be aborted, continued, or the current
child will be skipped by not descending into its children.

This is part of XSA-418 / CVE-2022-42321.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
tools/xenstore/xenstored_core.c
tools/xenstore/xenstored_core.h